<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/template/template2.xhtml">
	<ui:define name="header">
	     <div id="menu">
	     	<ul>
				<li><h:outputLink value="admin.xhtml"><h:outputText value="#{msg.home}"/></h:outputLink></li>
				<li><h:outputLink value="cadastro.xhtml"><h:outputText value="#{msg.cadastrar}"/></h:outputLink></li>
				<li><h:outputLink value="remover.xhtml"><h:outputText value="#{msg.remover}"/></h:outputLink></li>
				<li><h:outputLink value="alterar.xhtml"><h:outputText value="#{msg.alterar}"/></h:outputLink></li>
				<li class="current_page_item"><h:outputLink value="lrecados.xhtml"><h:outputText value="#{msg.recados}"/></h:outputLink></li>
				<li><h:outputLink value="mensagem.xhtml"><h:outputText value="#{msg.mensagem}"/></h:outputLink></li>
				<li><h:commandLink action="#{LoginBean.sair}"><h:outputText value="#{msg.encerrar}"/></h:commandLink></li>
			</ul>
		</div>
	</ui:define>
	<ui:define name="content">
	<p:growl/>
	  	<div class="post">
	  		
			  <div class="entry">
			    <p style="text-align:justify;">
				    <h:form>
				    <p:fieldset legend="#{msg.recados}" toggleable="true" toggleSpeed="500" collapsed="true">  			    
						<p:dataTable value="#{RecadoBean.listarRecados}" var="recado" style="width:400px;">
							<p:column>  
		          					<f:facet name="header">  
		                   			<h:outputText style="font-size:20px;" value="#{msg.recado}"/> 
		  			            </f:facet>  
					            <h:panelGroup>
									<h:outputText value="#{msg.recado} "/>
									<h:outputText value="#{recado.id}"/>
								</h:panelGroup>  
		       				</p:column> 
		       				<p:column>  
		          					<f:facet name="header">  
		                   			<h:outputText style="font-size:20px;" value="#{msg.nome}"/> 
		  			            </f:facet>  
					            <h:outputText value="#{recado.nome}" />  
		       				</p:column>
		       				<p:column>  
		          					<f:facet name="header">  
		                   			<h:outputText style="font-size:20px;" value="#{msg.mensagem}"/> 
		  			            </f:facet>  
					            <h:outputText value="#{recado.recado}" />  
		       				</p:column>
						</p:dataTable>	
					</p:fieldset>	
					</h:form>
					<br/>
					<h:form>
					<p:fieldset legend="#{msg.removerec}" toggleable="true" toggleSpeed="500" collapsed="true">  
						<h:panelGrid columns="2" border="0" >
				    		<h:outputText value="#{msg.recado}: " />
							<h:panelGroup>
								<h:selectOneMenu style="width:308px;" value="#{RecadoBean.id}" >
									<f:selectItem itemLabel="Escolha o Recado" noSelectionOption="true"/>
									<f:selectItems value="#{RecadoBean.listarRecadoss}" var="recado" itemLabel="#{msg.recado} #{recado.id}" itemValue="#{recado.id}"/>
								</h:selectOneMenu>
							</h:panelGroup> 
							
							<h:outputText/>
							<h:panelGroup>
								<div style="text-align: right;">
									<h:commandButton value="#{msg.enviar}" type="submit" action="#{RecadoBean.removerRecado}"/>
								</div>
							</h:panelGroup>
						</h:panelGrid>	
					</p:fieldset>
					</h:form>	    
			    </p>
			  </div>
		</div>
		<div style="clear: both; height: 164px;">&nbsp;</div>
	</ui:define>
</ui:composition>
</html>